package p2c.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;

public class BaseDao<T> {

	@Autowired
	protected MongoTemplate mongoTemplate;

	protected void save(T objectToSave) {
		mongoTemplate.save(objectToSave);
	}

	protected void save(T objectToSave, String collectionName) {
		mongoTemplate.save(objectToSave, collectionName);
	}
}
